package com.apes.scm.masterdata.product.es;

import com.apes.framework.jpa.comment.Comment;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Column;
import javax.persistence.Id;

@Data
@Document(indexName = "category")
public class EsCategory {

    @Id
    private String id;

    @Field(store = true, type = FieldType.Text)
    private String categoryId;

    //@Field(analyzer = "ik_max_word", store = true, searchAnalyzer = "ik_smart", type = FieldType.Text)
    @Field(store = true, type = FieldType.Text)
    private String name;

    @Field(store = true, type = FieldType.Text)
    private String initials; //拼音首字母

    @Field(store = true, type = FieldType.Boolean)
    private boolean valid;

    @Field(store = true, type = FieldType.Boolean)
    private boolean matchColor;

    @Field(store = true, type = FieldType.Boolean)
    private boolean matchCProduct;

    @Field(store = true, index = false, type = FieldType.Text)
    private String categoryPhotos;

    @Field(store = true, type = FieldType.Text)
    private String tags;
}
